﻿/*
 * Returns the specified date as an integer under the YYYYMMDD format.
 */
create function [Date].[ToInt] ( @p_Date date )
returns int as
begin

  return Convert( Int, Convert( Varchar, @p_Date, 112 ) );
  
end